package src.model.entity;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "DIRECTOR", schema = "HB")
@SequenceGenerator(name = "SEQ_GEN", sequenceName = "DRC_SEQ", initialValue = 1, allocationSize = 1)
public class Directors extends abstractEntity {

	private String DirectorName;
	private Set<Movies> moviess;
	
	@Column(name="DIRECTORNAME",unique=true)
	public String getDirectorName() {
		return DirectorName;
	}

	public void setDirectorName(String directorName) {
		DirectorName = directorName;
	}
	
	@OneToMany(mappedBy="directors")
	public Set<Movies> getMoviess() {
		return moviess;
	}

	public void setMoviess(Set<Movies> moviess) {
		this.moviess = moviess;
	}

	@Override
	public String toString() {
		return "Directors [DirectorName=" + DirectorName + "]";
	}
	

}
